function class_info = classifyAndCount(data,column)
    % 初始化class_info结构体
    class_info = struct();
    
    % 获取唯一的标签种类及其索引
    [unique_labels, ~, ic] = unique(data(:,1));
    
    % 遍历所有唯一的标签
    for i = 1:length(unique_labels)
        label = unique_labels(i);
        
        % 统计当前标签的样本数量
        count = sum(ic == i);
        idx = ic == i;
        % 将类别名称和样本数量存储到class_info中
        class_info.class{i}.name = label;
        class_info.class{i}.number = count;
        class_info.class{i}.class_data = data(idx,column);
        % 初始化count字段为0
        class_info.class{i}.count = 0;
    end
end